import { useEffect, useState } from "react";
import styles from "./style.less";
import { getItem, setItem } from "@/utils/localstorage";

function Home() {
  const [visible, setVisible] = useState(false);
  // const {
  //   initialState: { currentUser },
  // } = useModel('@@initialState');
  useEffect(() => {
    const res = getItem("roleId");
    console.log(res);
    if (res) {
      setVisible(false);
    } else {
      setVisible(true);
    }
  }, []);

  return (
    <div className={styles.bg}>
      <h1>欢迎使用</h1>
    </div>
  );
}

export default Home;
